package com.leadingsoft.pwxk.converter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.ProductInfoDto;
import com.leadingsoft.pwxk.model.ProductInfo;

/**
 * @author: lipan 2018年5月15日
 * @description: ()
 * 
 */

@Component
public class ProductInfoConverter extends AbstractConverter<ProductInfo, ProductInfoDto> {

	@Autowired
	private ProductTechConverter productTechConverter;

	@Override
	protected ProductInfoDto toDtoActual(ProductInfo model) {

		ProductInfoDto dto = new ProductInfoDto();
		dto.setId(model.getId());
		dto.setDataid(model.getDataid());
		dto.setHyname(model.getHyname());
		dto.setProductTechList(productTechConverter.toDto(model.getProductTechList()));
		return dto;
	}

	@Override
	public void copyProperties(ProductInfo model, ProductInfoDto dto) {

	}

}
